CREATE TABLE [dbo].[TDPRRE_GAST]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_PRRE_GAST] [dbo].[TD_VC_010] NOT NULL,
[FE_PRRE_GAST] [dbo].[TD_DT_001] NOT NULL,
[NU_CORR_GAST] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDPRRE_GA__NU_CO__33208881] DEFAULT ((0)),
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NULL,
[TI_AUXI_EMPR] [dbo].[TD_VC_001] NULL,
[CO_CENT_COST] [dbo].[TD_VC_020] NULL,
[CO_ORDE_SERV] [dbo].[TD_VC_020] NULL,
[TI_ENTI] [dbo].[TD_VC_001] NULL,
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[DE_ENTI] [dbo].[TD_VC_100] NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NULL,
[NU_DOCU_PROV] [dbo].[TD_VC_020] NULL,
[FA_CAMB_DOCU] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TDPRRE_GA__FA_CA__3414ACBA] DEFAULT ((0)),
[FA_CAMB_EXTR] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TDPRRE_GA__FA_CA__3508D0F3] DEFAULT ((0)),
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[IM_DOCU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDPRRE_GA__IM_DO__35FCF52C] DEFAULT ((0)),
[FE_DOCU] [dbo].[TD_DT_001] NOT NULL,
[IM_CONV] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDPRRE_GA__IM_CO__36F11965] DEFAULT ((0)),
[CO_TIPO_OPER] [dbo].[TD_VC_003] NULL,
[DE_OBSE] [dbo].[TD_VC_100] NULL,
[CO_TIOP_PROV] [dbo].[TD_VC_003] NULL,
[IM_BRUT_AFEC] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDPRRE_GA__IM_BR__37E53D9E] DEFAULT ((0)),
[IM_BRUT_INAF] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDPRRE_GA__IM_BR__38D961D7] DEFAULT ((0)),
[CO_IMP1] [dbo].[TD_VC_003] NULL,
[PC_IMP1] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TDPRRE_GA__PC_IM__39CD8610] DEFAULT ((0)),
[IM_IMP1] [dbo].[TD_NU_015_006] NULL,
[CO_IMP2] [dbo].[TD_VC_003] NULL,
[PC_IMP2] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TDPRRE_GA__PC_IM__3AC1AA49] DEFAULT ((0)),
[IM_IMP2] [dbo].[TD_NU_015_006] NULL,
[CO_IMP3] [dbo].[TD_VC_003] NULL,
[PC_IMP3] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TDPRRE_GA__PC_IM__3BB5CE82] DEFAULT ((0)),
[IM_IMP3] [dbo].[TD_NU_015_006] NULL,
[NU_IMPO] [dbo].[TD_VC_020] NULL,
[FE_REGI_COMP] [dbo].[TD_DT_001] NULL,
[ST_OBSE] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TDPRRE_GA__ST_OB__3CA9F2BB] DEFAULT ('N'),
[DE_OBSE_APRO] [dbo].[TD_VC_200] NULL,
[CO_USUA_APRO] [dbo].[TD_VC_008] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TDPRRE_GA__CO_US__3D9E16F4] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDPRRE_GA__FE_US__3E923B2D] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TDPRRE_GA__CO_US__3F865F66] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDPRRE_GA__FE_US__407A839F] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDPRRE_GAST] ADD CONSTRAINT [PK__TDPRRE_G__5061F5C9167A2832] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [NU_PRRE_GAST], [FE_PRRE_GAST], [NU_CORR_GAST]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDPRRE_GAST] ADD CONSTRAINT [FK__TDPRRE_GAST__66B60677] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_PRRE_GAST], [FE_PRRE_GAST]) REFERENCES [dbo].[TCPRRE_GAST] ([CO_EMPR], [CO_UNID_CONC], [NU_PRRE_GAST], [FE_PRRE_GAST])
GO
